class Card < ActiveRecord::Base
	belongs_to :player
	has_one :trick, :foreign_key => 'card_0_id'
	has_one :trick, :foreign_key => 'card_1_id'
	has_one :trick, :foreign_key => 'card_2_id'
	has_one :trick, :foreign_key => 'card_3_id'
	def pp
		case self.value
		when 11	
			result = "J"
		when 12
			result = "Q"
		when 13
			result = "K"
		when 14
			result = "A"
		else
			result = self.value
		end
			return "#{result}#{self.suit}"
	end
end
